# $Id$ 
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=pango
pkgver=1.40.12
pkgrel=1
pkgdesc="A library for layout and rendering of text"
url="https://www.pango.org/"
arch=(i686 x86_64)
license=(LGPL)
depends=(libthai cairo libxft harfbuzz)
makedepends=(harfbuzz fontconfig cairo libxft libthai gobject-introspection help2man gtk-doc git meson)
checkdepends=(ttf-dejavu cantarell-fonts)
_commit=fd429398a64bc2d7a01da64efa736bbb6eec6a29  # tags/1.40.12^0
source=("git+https://git.gnome.org/browse/pango#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  mkdir build
  cd $pkgname
}

build() {
  cd build
  meson --prefix=/usr --buildtype=release ../$pkgname \
    --libexecdir=/usr/lib -Denable_docs=true
  ninja
}

check() {
  cd build
  mesontest
}

package() {
  cd build
  DESTDIR="$pkgdir" ninja install
}
